home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / latexspider / web.sty (.txt) < prev    next >
LaTeX Document  |  1992-09-22  |  10KB  |  257 lines

  1. %% This is file `web.sty' generated
  2. %% on <1991/6/19> with the docstrip utility (v1.1l test). 
  3. %% The original source file was `web.doc'.
  4. %% You are not allowed to distribute this file without the corresponding 
  5. %% `.doc' version containing the documentation. 
  6. \iffalse % -*-latex-*-
  7. %% Copyright D.Love, SERC Daresbury Laboratory, 1991
  8. %% The `doc' version of this style is re-distributable and usuable
  9. %% under conditions of the GNU copyleft, but please mark any changes,
  10. %% list them here and report any major enhancements to the author.
  11. \iffalse %  hack RCS info into a sensible form:
  12. \def\next$#1: #2/#3/#4 #5 ${\def\filedate{#4/#3/#2}\def\filetime{#5}}
  13. \next$Date: 91/04/30 19:30:11 $
  14. \def\next$#1: #2 ${\def\fileversion{#2}}
  15. \next$Revision: 1.1 $
  16. \typeout{Sub-style `web', version \fileversion\space of \filedate}
  17. \parskip \z@
  18. \ifx\DocInput\undefined
  19. \ifcase \@ptsize
  20.    \textheight = 53 \baselineskip
  21.    \textheight = 47 \baselineskip
  22.    \textheight = 43 \baselineskip
  23. \fi  \advance \textheight by \topskip
  24. \textwidth=6.27in  \oddsidemargin=\z@  \evensidemargin=\z@
  25. \pagestyle{myheadings}
  26. \ifx\DocInput\undefined \sectionmark{1} \fi
  27. \@ifundefined{selectfont}{%
  28.      \let\normal@font=\relax}   % old scheme
  29.    {% new scheme
  30.      \def\normal@font{\series \mediumseriesdefault
  31.      \shape \normalshapedefault}}
  32. \ifx\DocInput\undefined
  33. \def\@maketitle{%
  34.   \newpage  \thispagestyle{empty} \null
  35.   \begin{center}
  36.   {\LARGE \@title \par}  \vskip 1.5em
  37.   {\large   \lineskip .5em
  38.     \begin{tabular}[t]{c} \@author  \end{tabular} \par}
  39.   \vskip 1em  {\large \@date}
  40.   \end{center}
  41.   \par   \vskip 1.5em
  42.   \topofcontents  \tableofcontents  \par  \botofcontents \newpage }
  43. \ifx\DocInput\undefined
  44. \def\maketitle{%
  45.   \par \begingroup
  46.     \pagenumbering{roman}  \setcounter{page}{0}
  47.     \def\thefootnote{\fnsymbol{footnote}}
  48.     \def\@makefnmark{\hbox to \z@ {$^{\@thefnmark}$\hss}}
  49.     \if@twocolumn  \twocolumn[\@maketitle]
  50.     \else  \newpage  \global\@topnum\z@  \@maketitle  \fi
  51.     \@thanks
  52.   \endgroup
  53.   \setcounter{footnote}{0}  \pagenumbering{arabic}
  54.   \let\maketitle\relax  \let\@maketitle\relax
  55.   \gdef\@thanks{}\let\thanks\relax}
  56. \let\@title=\empty  \let\@author=\empty
  57. \def\tableofcontents{%
  58.   \noindent Section \hfill Page \par  \@starttoc{toc}}
  59. \def\topofcontents{}  \def\botofcontents{}
  60. \let\ttitlefont=\tt  \let\titlefont=\rm
  61. \newcommand{\id}[1]{\mbox{\idfont #1\/\kern.05em}}
  62. \newcommand{\ida}[1]{\mbox{$ #1 $}}
  63. \newcommand{\idfont}{\normal@font \it}
  64. \newcommand{\reservedfont}{\normal@font \bf}
  65. \newcommand{\res}[1]{\mbox{\reservedfont#1\/}}
  66. \def\str#1{%
  67.   \ifmmode \gdef\@tempa{\null$\null}\else \gdef\@tempa{}\fi
  68.   \@tempa {%
  69.   \let\\=\BS  \let\'=\RQ  \let\`=\LQ  \let\{=\LB  \let\}=\RB
  70.   \let\~=\TL  \let\ =\SP  \let\&=\AM  \def\^{{\tt \char`\^}}%
  71.   \leavevmode \normal@font\tt #1}\@tempa}
  72. \chardef\AM=`\&                 % ampersand
  73. \chardef\BS=`\\                 % backslash
  74. \chardef\LB=`\{                 % left brace
  75. \def\LQ{{\tt\char'22}}          % left quote
  76. \chardef\RB=`\}                 % right brace
  77. \def\RQ{{\tt\char'23}}          % right quote
  78. \def\UL{{\tt\char`\_}}          % underline character in a string
  79. \def\TL{{\tt\char`\~}}          % tilde
  80. \newcommand{\SP}{\char`\ \discretionary{\hbox{\char`\\}}{}{}}
  81. \newcommand{\vstr}[1]{\kern 2pt \fbox{\str{#1}}\kern 2pt}
  82. \setlength{\fboxsep}{2pt}
  83. \def\const#1{{%
  84.   \def\?{\kern.2em}%
  85.   \def\${\ell}% long
  86.   \def\_{\RealConstFormat{\aftergroup}}% power of ten
  87.   \def\~{\hbox{\rm \char'23\kern-.2em \it \aftergroup\?\aftergroup}}% octal
  88.   \def\^{\hbox{\rm "\tt \aftergroup}}% hex
  89.   #1}}                          % (\def{\const})
  90. \newcommand{\RealConstFormat}{\cdot 10^}
  91. \newcount\ind
  92. \newbox\bak  \setbox\bak=\hbox to \m@ne em{}
  93. \newbox\bakk \setbox\bakk=\hbox to -2em{}
  94. \def\0{%
  95.   \ifmmode
  96.     \ifinner$\par\hangindent\ind em\noindent\kern\ind em\ignorespaces$\fi
  97.   \else
  98.     \par\hangindent\ind em\noindent \kern\ind em\ignorespaces
  99.   \fi}
  100. \newcommand{\1}{\global\advance\ind by 1 \hangindent\ind em}
  101. \newcommand{\2}{\global\advance\ind by \m@ne }
  102. \newcommand{\3}[1]{\hfil \penalty#10 \hfilneg}
  103. \newcommand{\4}{\copy\bak}
  104. \newcommand{\5}{\hfil \penalty \m@ne  \hfilneg \kern 2.5em \copy\bakk
  105.   \ignorespaces}
  106. \def\6{\ifmmode \else \par
  107.   \hangindent\ind em\startline \ignorespaces \fi}
  108. \def\startline{\noindent \count255=\ind \advance\count255 by -2
  109.   \hskip\count255 em}
  110. \newcommand{\7}{\Y\6}
  111. \newcommand{\8}{\unskip}
  112. \newcommand{\J}{\str{@\&}}
  113. \def\C#1{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi
  114.    \XX \hfil \penalty \m@ne\hfilneg\quad % original spider
  115.    $\commentbegin\,$\endcodehook{#1}\startcodehook$\,
  116.    \commentend$\XX}
  117. \def\onmaybe{\let\ifon=\maybe}  \let\maybe=\iftrue  \newif\ifon
  118. \outer\def\M#1.{%
  119.   \MN#1.\ifon\vfil\penalty-100\vfilneg
  120.   \vskip12ptminus3pt \startsection \ignorespaces}
  121. \def\startsection{\Q \noindent {\let\*=\lapstar \bf \modstar.\quad }}
  122. \newcommand{\lapstar}{\rlap{*}}
  123. \outer\def\N#1.#2.{%
  124.   \MN#1.\headcheck#2\headcheck
  125.   \typeout{*\modno} % progress report
  126.   \addcontentsline{toc}{\headcheck@type}
  127.     {\hbox to 2em{\modno\hfill} \quad \theopen \relax \themodtitle}
  128.   \markboth{% running headline
  129.     {\protect\small \qquad\uppercase{\ignorespaces\themodtitle}}
  130.       \hfill {\protect\small \@title}\qquad{\rm \old@S \modno}}
  131.     {\rm \old@S \modno\qquad {\protect\small \@title}\hfill
  132.       {\protect\small \uppercase{\ignorespaces\themodtitle\qquad}}}
  133.   \ifon\startsection {\bf \ignorespaces \themodtitle.\quad }\ignorespaces}
  134. \def\MN#1.{%
  135.   \par {\xdef\modstar{#1}\let\*=\empty\xdef\modno{#1}}%
  136.   \ifx\modno\modstar \onmaybe \else \ontrue \fi
  137.   \sectionmark{\modno}
  138.   \let\@tempa\protect
  139.   \def\protect{\noexpand\protect\noexpand}%
  140.   \def\@currentlabel{#1}%
  141.   \let\protect\@tempa} % def\MN
  142. \def\note#1#2.{\Y \noindent {\hangindent 2em \footnotesize
  143.   \baselineskip 10pt#1 #2.\par}}
  144. \newcommand{\A}{\note{See also}}
  145. \def\l@part{\addpenalty{\@secpenalty}
  146.    \addvspace{3pt plus 1pt}     % space above part line
  147.    \@dottedtocline{0}{\z@ }{4em}}
  148. \def\l@norm{\addpenalty{\@secpenalty}
  149.    \@dottedtocline{0}{\z@ }{4em}}
  150. \def\l@num{\@dottedtocline{0}{0em}{4em}}
  151. \newif\ifcancel  \cancelfalse
  152. \def\ifnextchar#1#2#3{%
  153.   \let\@tempe=#1\def\@tempa{#2}\def\@tempb{#3}\@ifnch}
  154. \def\@ifnch{%
  155.   \ifx \@tempc \@tempe\let\@tempd\@tempa
  156.   \else \let\@tempd\@tempb
  157.   \fi
  158.   \@tempd}
  159. \def\makethechar#1{\let\@tempc=#1}
  160. \def\headcheck#1#2\headcheck{%
  161.   \makethechar{#1}%
  162.   \def\theskipper{\vfil\penalty-100 % skip before new module
  163.     \vfilneg\vskip12ptminus3pt}%
  164.   \def\theopen{}% opening skip in toc entry
  165.   \def\thetocskip{}% vertical skip before toc entry
  166.   \def\themodtitle{{#2}}%
  167.   \def\headcheck@type{num}%
  168.   \ifnextchar={%
  169.     \def\theskipper{\newpage}  \canceltrue
  170.     \def\headcheck@type{part}       \def\theopen{\bf}%
  171.     \def\thetocskip{\vskip 3pt plus 1in \penalty-100
  172.       \vskip \z@  plus -1in}%
  173.     }{\ifnextchar1{%
  174.       \cancelfalse      \def\theskipper{\newpage}%
  175.       \def\theopen{\hskip2em}%
  176.     }{\ifnextchar2{%
  177.       \cancelfalse      \def\theopen{\hskip2em}%
  178.     }{\ifnextchar3{%
  179.       \cancelfalse      \def\theskipper{\newpage}%
  180.       \def\theopen{\hskip4em}%
  181.     }{\ifnextchar4{%
  182.       \cancelfalse      \def\theopen{\hskip4em}%
  183.     }{% else
  184.       \ifcancel\else \def\theskipper{\newpage}\fi
  185.       \cancelfalse      \def\headcheck@type{norm}%
  186.       \def\themodtitle{#1{#2}}%
  187.     }}}}}%
  188.     \theskipper }
  189. \newcommand{\code}{%
  190.   \rightskip=\z@  plus 100pt minus 10pt
  191.   \sfcode`;=3000    \pretolerance \@M
  192.   \hyphenpenalty 9999  \exhyphenpenalty \@M
  193.   \global\ind=2 \1 \startline
  194.   \startcodehook} % \def\code
  195. \let\old@=\@   \let\old@S=\S  \let\old@percent=\%
  196. \let\old@hash=\#
  197. \chardef\code@=`\@
  198. \def\tt@percent{\hbox{\tt\char`\%}}  \def\tt@hash{\hbox{\tt\char`\#}}
  199. \def\startcodehook{\let\@=\code@  \let\S=\equiv  \let\%=\tt@percent
  200.   \let\#=\tt@hash  \def\^{\hbox{\tt\char`\^}}}
  201. \def\endcodehook{\let\@=\old@  \let\S=\old@S  \let\%=\old@percent
  202.   \let\#=\old@hash  \def\^##1{{\accent94 ##1}}}
  203. \def\Q{\rightskip=\z@   \sfcode`;=1500  \pretolerance 200
  204.   \endcodehook}
  205. \def\DC{\endcodehook \egroup}
  206. \def\CD{\relax
  207.   \ifmmode \hbox\fi \bgroup \startcodehook}
  208. \newcommand{\U}{\note{This code is used in}}
  209. \def\X#1:#2\X{%
  210.   \ifmmode \gdef\XX{\null$\null}\else \gdef\XX{}\fi
  211.   \XX$\langle\,$#2{\footnotesize \kern.5em #1}$\,\rangle$\XX }
  212. \def\XF#1:#2\XF{%
  213.   \ifmmode \gdef\XX{\null$\null}\else \gdef\XX{}\fi
  214.   \XX {\tt (#2{\footnotesize \kern.5em #1})}\XX}
  215. \newcommand{\Y}{\par\yskip}
  216. \let\yskip=\smallskip
  217. \newcommand{\D}{\defin{define}} % macro definition
  218. \newcommand{\F}{\defin{format}} % format definition
  219. \newcommand{\defin}[1]{\global\advance\ind by 2 \1\res{#1 }}
  220. \newcommand{\DO}{\hbox{\sl\char'044}}    % slant dollar sign (used by awkweb)
  221. \let\G=\ge                      % greater than or equal sign
  222. \let\I=\ne                      % unequal sign
  223. \let\K=\gets                    % left arrow
  224. \let\L=\le                      % less than or equal sign
  225. \let\R=\lnot                    % logical not
  226. \let\TI=\sim                    % tilde
  227. \let\V=\lor                     % logical or
  228. \let\W=\land                    % logical and
  229. \def\vert{|}   \let\amp=\&   \let\PP=\P   \let\*=*
  230. \def\AT!{@}
  231. \def\ch{\note{The following sections were changed by the change file:}
  232.   \let\*=\relax}
  233. \def\inx{%
  234.   \typeout{Index:}
  235.   \begin{multicols}{2}
  236.   \parskip \z@  plus .5pt
  237.   \parfillskip \z@  plus .6\hsize % try to avoid almost empty lines
  238.   \outer\def\:##1, {\par\hangindent2em\noindent##1:\kern1em} % index entry
  239.   \rm  \tolerance \@M  \let\*=\lapstar
  240.   \hyphenpenalty \@M \parindent=\z@  }
  241. \def\fin{%
  242.   \end{multicols}  \newpage
  243.   \parfillskip \z@  plus 1fil
  244.   \markboth{{\protect\small NAMES OF THE SECTIONS}\hfill
  245.       {\protect\small\@title}}
  246.     {{\protect\small\@title}\hfill
  247.     {\protect\small NAMES OF THE SECTIONS\quad}}
  248.   \typeout{Section names:}
  249.   \def\note##1##2.{\quad{\footnotesize##1 ##2.}}
  250.   \def\U{\note{Used in}}%
  251.   \def\:{\par\hangindent 2em}\let\*=*}
  252. \newcommand{\con}{\end{document}}
  253. \input{multicol.sty}
  254. \input{\webmacs}
  255. \let\webmacs=\empty
  256. %% \endinput
  257.